.file-tree-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background-color: #1e1e1e;
  border-right: 1px solid #333;
  font-size: 12px;
}

.file-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid #333;
  background-color: #252525;
  flex: 0 0 auto;
}

.file-tree-header-title {
  font-weight: 500;
  color: #e0e0e0;
  font-size: 12px;
  user-select: none;
}

.file-tree-actions {
  display: flex;
  gap: 4px;
}

.action-button {
  color: #aaa;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.action-button:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.file-tree-search {
  padding: 4px 8px;
  border-bottom: 1px solid #333;
  background-color: #252525;
  flex: 0 0 auto;
}

.file-tree-content {
  flex: 1 1 auto;
  position: relative;
  overflow: auto;
  padding: 0 !important;
}

.custom-input {
  background-color: #2c2c2c !important;
  border-color: #444 !important;
  color: #ddd !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
  height: 24px !important;
  font-size: 11px !important;
  padding: 0 6px !important;
}

.custom-input:hover, .custom-input:focus-within {
  border-color: #1890ff !important;
}

.custom-input input {
  color: #ddd !important;
  height: 22px !important;
  font-size: 11px !important;
  padding: 0 4px !important;
}

.custom-input .ant-input-prefix {
  color: #999 !important;
}

/* File tree node styling */
.file-tree-container .ant-tree {
  background-color: transparent !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

.file-tree-container .ant-tree-list {
  height: auto !important;
  overflow: visible !important;
}

.file-tree-container .ant-tree-list-holder {
  height: auto !important;
  overflow: visible !important;
}

.file-tree-container .ant-tree-list-holder-inner {
  height: auto !important;
  overflow: visible !important;
}

.file-tree-container .ant-tree-node-content-wrapper {
  transition: all 0.2s ease;
  padding: 1px 4px;
  border-radius: 2px;
}

.file-tree-container .ant-tree-node-content-wrapper:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.file-tree-container .ant-tree-node-selected {
  background-color: rgba(24, 144, 255, 0.2) !important;
}

.file-tree-container .ant-tree-switcher {
  color: #aaa;
}

.file-tree-container .ant-tree-title {
  color: #e0e0e0;
  font-size: 12px;
}

.file-node {
  display: flex;
  align-items: center;
  gap: 3px;
}

.file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  width: 16px;
  height: 16px;
}

.file-icon.folder {
  color: #e8c37b;
}

.file-icon.file {
  color: #9cdcfe;
}

.file-icon.file-js, .file-icon.file-ts, .file-icon.file-jsx, .file-icon.file-tsx {
  color: #4fc1ff;
}

.file-icon.file-css, .file-icon.file-scss, .file-icon.file-less {
  color: #ce9178;
}

.file-icon.file-json {
  color: #fad67d;
}

.file-icon.file-md {
  color: #c586c0;
}

.file-icon.file-html {
  color: #e06c75;
}

.file-icon.file-py {
  color: #4ec9b0;
}

.file-name {
  overflow: visible;
  white-space: nowrap;
}

.empty-state {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #777;
  text-align: center;
  padding: 20px;
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state-text {
  font-size: 0.9rem;
}

.path-breadcrumb {
  color: #888;
  font-size: 0.8rem;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Ensure the Tree component itself has proper overflow behavior */
.file-tree {
  height: 100%;
  overflow: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px;
}

/* 确保Tree组件内部的滚动区域正常工作 */
.file-tree-container .ant-tree-treenode {
  width: auto;
  min-width: 100%;
  padding: 2px 0 !important;
}

/* VSCode dark theme for modals */
.vscode-dark-modal .ant-modal-content {
  background-color: #1e1e1e !important;
  border: 1px solid #333 !important;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2) !important;
}

.vscode-dark-modal .ant-modal-header {
  background-color: #252525 !important;
  border-bottom: 1px solid #333 !important;
}

.vscode-dark-modal .ant-modal-title {
  color: #e0e0e0 !important;
}

.vscode-dark-modal .ant-modal-close {
  color: #aaa !important;
}

.vscode-dark-modal .ant-modal-close:hover {
  color: #fff !important;
}

.vscode-dark-modal .ant-modal-body {
  color: #e0e0e0 !important;
}

.vscode-dark-modal .ant-form-item-label > label {
  color: #e0e0e0 !important;
}

.vscode-dark-modal .ant-form-item-required::before {
  color: #ff4d4f !important;
}

.vscode-dark-modal .ant-form-item-explain, .vscode-dark-modal .ant-form-item-extra {
  color: #aaa !important;
}

.vscode-dark-modal .ant-input {
  background-color: #2c2c2c !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

.vscode-dark-modal .ant-input:hover, .vscode-dark-modal .ant-input:focus {
  border-color: #1890ff !important;
}

.vscode-dark-modal .ant-modal-footer {
  border-top: 1px solid #333 !important;
}

.vscode-dark-modal .ant-btn {
  background-color: #2c2c2c !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

.vscode-dark-modal .ant-btn:hover {
  background-color: #3c3c3c !important;
  border-color: #555 !important;
}

.vscode-dark-modal .ant-btn-primary {
  background-color: #0e639c !important;
  border-color: #0e639c !important;
  color: #fff !important;
}

.vscode-dark-modal .ant-btn-primary:hover {
  background-color: #1177bb !important;
  border-color: #1177bb !important;
}

.vscode-dark-modal .ant-btn-primary[disabled], .vscode-dark-modal .ant-btn-primary[disabled]:hover {
  background-color: #164b6e !important;
  border-color: #164b6e !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

/* VSCode dark theme for context menu (dropdown) */
.vscode-dark-dropdown .ant-dropdown-menu {
  background-color: #252526 !important;
  border: 1px solid #3c3c3c !important;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32) !important;
  padding: 4px 0 !important;
}

.vscode-dark-dropdown .ant-dropdown-menu-item {
  color: #cccccc !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
}

.vscode-dark-dropdown .ant-dropdown-menu-item:hover {
  background-color: #04395e !important;
  color: #ffffff !important;
}

.vscode-dark-dropdown .ant-dropdown-menu-item .anticon {
  color: #cccccc !important;
  margin-right: 8px !important;
}

.vscode-dark-dropdown .ant-dropdown-menu-item:hover .anticon {
  color: #ffffff !important;
}

.vscode-dark-dropdown .ant-dropdown-menu-item-divider {
  background-color: #3c3c3c !important;
  margin: 4px 0 !important;
}
